import request from '/@/utils/request';

export function getGroupList(query: Object) {
    return request({
        url: '/api/v1/system/groups',
        method: 'get',
        params: query
    })
}

export function getGroupOptions(query: Object) {
    return request({
        url: '/api/v1/system/group/options',
        method: 'get',
        params: query
    })
}

export function getGroup(query: Object) {
    return request({
        url: '/api/v1/system/group/detail',
        method: 'get',
        params: query
    })
}

export function addGroup(data: object) {
    return request({
        url: '/api/v1/system/group/add',
        method: 'post',
        data: data
    })
}


export function updateGroup(data: object) {
    return request({
        url: '/api/v1/system/group/update',
        method: 'put',
        data: data
    })
}

export function deleteGroup(id: number) {
    return request({
        url: '/api/v1/system/group/delete',
        method: 'delete',
        data: {id: id}
    })
}



